from requests import get,ConnectTimeout
from lxml import etree
def get_xpath(*args,**kw):
    try:
        r=get(*args,timeout=2,**kw)
        if r.status_code!=200:
            print('There may be an exception here ,because the syatus_code is %s'%r.status_code)
        response=etree.HTML(r.text)
        return response
    except ConnectTimeout as e:
        print('Timeout From get_xpath! ')
        
        
